<style>
    .basicinfo {
        margin: 15px 0;
    }

    .basicinfo .row > .col-xs-4 {
        padding-right: 0;
    }

    .basicinfo .row > div {
        margin: 5px 0;
    }
</style>
    <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<div id="content-container" class="container">
    <div class="row">
        <div class="col-md-3">
            {include file="common/sidenav" /}
        </div>
        <div class="col-md-9">
            <div class="panel panel-default panel-page">
            
<form name="form" id="login-form" class="form-vertical nice-validator n-default n-bootstrap" method="POST" action="" novalidate="novalidate">
<input type="hidden" name="ylnum"  id='ylnum' value="{$info.num}">
<input type="hidden" name="yluserName"  id='yluserName' value="{$info.userName}">
<input type="hidden" name="ylid"  value="{$info.id}">
<input type="hidden" name="insurance_company"  value="{$info.insurance_company}">
<input type="hidden" name="type"  value="{$info.type}">
 
                <div class="form-group">
                    <label class="control-label">转入账号</label>
                    <div class="controls">
                        <input type="text" id="userName" name="userName" class="form-control input-lg" placeholder="请输入转入账号">
                        <p class="help-block"></p>
                    </div> 

                    <!-- <div class="controls" id="bbbb"></div>  -->
                </div>



                <div class="form-group">
                    <label class="control-label">年限</label>
                    <div class="controls">
                        <select id="safe_years" name="safe_years" class="form-control selectpicker"  style="height:3.5em"> 
                                    <option value="{$info.safe_years}" data='{$info.safe_years}'> {$info.safe_years}年</option>
                            </select> 
                        <p class="help-block"></p>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label">转入数量(当前账号已有数量：{$info.num})</label>
                    <div class="controls">
                        <input type="text" id="num" name="num" class="form-control input-lg" placeholder="请输入转入数量">
                        <p class="help-block"></p>
                    </div>
                </div>

                <div class="form-group">
                    <!-- <button type="submit" class="btn  btn-danger btn-lg btn-block">立即支付</button> -->
                    <a href="javascript:pay();" class="btn btn-lg btn-danger btn-donate" data-image="https://cdn.fastadmin.net/uploads/donate/karson.png" data-name="third"><i class="fa fa-money"></i> 立即转入</a> 
                </div>
</form>

                <script type="text/javascript">
                    function pay() {
                        if($('#userName').val()==''){ 
                            layer.msg('请输入转入账号');
                            return;
                        }else if($('#num').val()==''){ 
                            layer.msg('请输入转入数量');
                            return;
                        }
                        else if(parseInt($('#num').val())>parseInt($('#ylnum').val())){
                            layer.msg('转出数量不得大于已有数量');
                            return;
                        }else{
                            $('#login-form').submit(); 
                        }
                    } 
                </script>

            </div>
        </div>
    </div>
</div>